package com.tanger.auth.event;

import org.springframework.context.ApplicationEvent;

/**
 * @Description 定义事件基础类:用于业务解耦
 * @Author Hchenbin
 * @Date 2022/7/20 16:56
 * @Version 1.0
 */
public class LoginEvent extends ApplicationEvent {

    private String eventName;
    private String eventType;
    private Object data;

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public LoginEvent(Object source) {
        super(source);
    }

    public LoginEvent(String eventName, String eventType, Object data, Object source){
        super(source);
        this.eventName = eventName;
        this.eventType = eventType;
        this.data = data;
    }
}
